﻿using UnityEngine;
using System.Collections;

public class FX_color : MonoBehaviour {

	public float fTimeScale = 1.0f;

	float timer = 0;
	
	[SerializeField]
	Gradient colorGradient;
	
	void Update ()
	{
		Color color = colorGradient.Evaluate(timer*fTimeScale);
		
		renderer.material.SetColor("_TintColor",color);
		
		timer += Time.deltaTime;
	}
}
